// const elixir = require('laravel-elixir')
//
// require('laravel-elixir-vue-2')
// /*
//  |--------------------------------------------------------------------------
//  | Elixir Asset Management
//  |--------------------------------------------------------------------------
//  |
//  | Elixir provides a clean, fluent API for defining some basic Gulp tasks
//  | for your Laravel application. By default, we are compiling the Sass
//  | file for your application as well as publishing vendor resources.
//  |
//  */
//
// elixir((mix) => {
//   mix.sass('app.scss')
//     .webpack('app.js')
// })

const elixir = require('laravel-elixir')
const path = require('path')

require('laravel-elixir-vue-2')
/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

elixir(mix => {
  // Elixir.webpack.config.module.loaders = [];

  elixir.webpack.mergeConfig({
    resolveLoader: {
      root: path.join(__dirname, 'node_modules')
    },
    module: {
      loaders: [
        {
          test: /\.css$/,
          loader: 'style!css'
        },
        {
          test: /\.scss$/,
          loader: 'style!css!sass?sourceMap'
        },
        {
          test: /\.(png|jpg|gif)$/,
          loader: 'url-loader?limit=8192'
        }
      ]
    }
  })

  mix.sass('app.scss')
    .webpack('app.js')
})
